﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MySite.Model.StudyNoteInfo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	学习笔记列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>学习笔记列表</h2>
    <%: Html.ActionLink("新增", "StudyNoteAdd")%>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="listable">
        <tr  class="listheader">
            <td></td>
            <td>
                标题
            </td>
            <td>
                分类
            </td>
            <td>
                内容
            </td>
            <td>
                发布日期
            </td>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td style="width:80px;">
                <%: Html.ActionLink("编辑", "StudyNoteEdit", new { pid = item.PID })%> |
                <%: Html.ActionLink("删除", "StudyNoteDelete", new { pid = item.PID })%>
            </td>
            <td>
                <%: item.Title %>
            </td>
            <td>
                <%: item.Type %>
            </td>
            <td>
                <%= Server.HtmlDecode(item.Content) %>
            </td>
            <td>
                <%: item.PublishDate.ToString("yyyy/MM/dd") %>
            </td>
        </tr>
    
    <% } %>
    </table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>

